/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package JFreeChartExtensions.chartextensions.averageloader;


import JFreeChartExtensions.chartextensions.extensionImpl.*;
import JFreeChartExtensions.chartextensions.AbstractChartPanelExtension;
import JFreeChartExtensions.chartextensions.averageloader.AverageLoaderManager;
import JFreeChartExtensions.ExtendableChartPanel;
import JFreeChartExtensions.containers.InternalFrameWithChart.InternalFrameWithChart;
import org.jfree.chart.ChartPanel;

/**
 *
 * @author Nobody
 */
public class AverageLoaderExtension extends AbstractChartPanelExtension {

    @Override
    public void applyExtension(ChartPanel chartPanel) {
        this.chartPanel = (ExtendableChartPanel) chartPanel;
        chartExtensionManager = new AverageLoaderManager();
        chartExtensionManager.register(chartPanel);

    }

    public AverageLoaderExtension(ExtendableChartPanel panel) {
        super(panel);
        name = "AverageLoaderExtension";
    }

    @Override
    public void removeExtension() {
        chartExtensionManager.unregister();
    }
}
